Imports WinXound_Net.gVar

Public Class FormUdoInfo


    Public mText As String
    Public mFile As String


    Private Sub FormUdoInfo_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        If e.KeyCode = Keys.Escape Then
            ButtonCancel.PerformClick()
        End If
    End Sub

    Private Sub FormUdoInfo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Me.Text = " Udo and Code Repository Info:  " & mFile

        ScI_EDIT_UDO.SetCodePage(SC_CP_UTF8)

        'Set Syntax foreground colors
        ScI_EDIT_UDO.StyleSetFore(1, RGB(0, 150, 0))          'Comment Multi /**/
        ScI_EDIT_UDO.StyleSetBack(1, RGB(255, 255, 255))      'Comment Multi /**/
        ScI_EDIT_UDO.StyleSetFore(2, RGB(0, 150, 0))          'Comment Line //
        ScI_EDIT_UDO.StyleSetBack(2, RGB(255, 255, 255))      'Comment Line //

        'Set Syntax Language
        ScI_EDIT_UDO.SetLexerLanguage("cpp")

        ScI_EDIT_UDO.SetWrapMode(1)
        ScI_EDIT_UDO.SetWrapVisualFlags(1)
        ScI_EDIT_UDO.SetText(mText)
        ScI_EDIT_UDO.SetReadOnly(True)

    End Sub

    Private Sub ButtonCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCancel.Click
        Me.DialogResult = Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub ButtonInsert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonInsert.Click
        Me.DialogResult = Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub ScI_EDIT_UDO_KeyDown(ByVal sender As SCI_EDIT, ByVal mKey As Integer, ByVal mModifiers As Integer) Handles ScI_EDIT_UDO.KeyDown
        If mKey = Keys.Escape Then
            ButtonCancel.PerformClick()
        End If
    End Sub

End Class